package com.yutian.selfservice.controller;

import com.yutian.selfservice.service.UploadService;
import com.yutian.selfservice.support.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;

@Controller
@RequestMapping("/upload")
public class UploadController {
    @Autowired
    private UploadService uploadService;

    @PostMapping("/")
    @ResponseBody
    public Result upload(HttpServletRequest request){
        return uploadService.upload(request);
    }
}
